#! /usr/bin/env bash

interface=$1

if [ "" = "$interface" ]
then
	echo Usage: $(basename $0) interface
	exit
fi

echo $$ >> "$(echo $0 | sed s/\.sh$//).pid"

cd "$(dirname "$0")"
cd ..

file=scan/$(date +"%Y/%m/%d/%H/%M/%S")
mkdir -p ${file:0:21}

airodump-ng --write $file $interface

